<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./plantilla.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="top">
        top
    </ui:define>

    <ui:define name="left">
        left
    </ui:define>

    <ui:define name="content">
        <f:view>
            <h:form>
                <h:panelGrid columns="2">
                    <h:inputText value="#{controlador.cadena}"/>
                    <h:commandButton value="Buscar" 
                                     action="#{controlador.doBuscarArea()}"/>
                    <h:commandLink value="Nueva Area" action="#{controlador.doRegistraArea()}"/>
                    
                </h:panelGrid>
                <h1><h:outputText value="List"/></h1>
                <h:dataTable value="#{controlador.listaArea}" var="item">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="CodigoArea"/>
                        </f:facet>
                        
                        <h:outputText value="#{item.codigoArea}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="DescripcionArea"/>
                        </f:facet>
                        <h:outputText value="#{item.descripcionArea}"/>
                    </h:column>
                </h:dataTable>
            </h:form>
        </f:view>

    </ui:define>

    <ui:define name="bottom">
        bottom
    </ui:define>

</ui:composition>
